<template>
	<!-- 顶端 -->
	<view class="nav-bar">
		<!-- 返回箭头 -->
		<text class="back" @click="goBack" v-if="showBack">&#60;</text>
		<!-- 标题 -->
		<text class="title" v-if="title">{{ title }}</text>
	</view>
</template>

<script>
	export default {
		props: {
			showBack: {
				type: Boolean,
				default: false
			},
			title: {
				type: String,
				default: null
			}
		},
		methods: {
			// 返回上一页
			goBack() {
				uni.navigateBack();
			}
		}
	}
</script>

<style lang="scss">
</style>
